package com.sq.ai.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sq.ai.entry.ChannelVo;
import com.sq.ai.pojo.ZtChannel;
import com.sq.ai.service.ZtChannelService;
import com.sq.ai.mapper.ZtChannelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 *
 */
@Service
public class ZtChannelServiceImpl extends ServiceImpl<ZtChannelMapper, ZtChannel>
    implements ZtChannelService{

    @Autowired
    private ZtChannelMapper ztChannelMapper;


    @Override
    public List<ChannelVo> selectZtChannel(ZtChannel ztChannel) {
        try {
            return ztChannelMapper.selectZtChannel(ztChannel);
        } catch (Exception e) {
            e.printStackTrace();
            return new ArrayList<>();
        }
    }

    @Override
    public long maxChannelId() {
        return ztChannelMapper.maxChannelId();
    }
}




